﻿using System;
using System.IO;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using PluginInterface;

namespace hlighttohtml
{
    public class ToHTML
    {
        public IPlugin Plugin;

        public void SetLang(string Extension)
        {
            Plugin = (IPlugin)Global.Plgns.plugins[Extension];
        }

        public void Parse(string input, string output)
        {
            StreamReader Reader = new StreamReader(input);
            StreamWriter Writer = new StreamWriter(output);
            string code = Reader.ReadToEnd();
            Reader.Close();

            Writer.WriteLine(Plugin.SourcetoHtml(code));
            
            Writer.Close();
        }
        
        
    }
}
